package OOP;
/*
测试几个数相加的方法 （可变参数）
 */
public class Test_kbcs {
    public int jiafa(int... nums){
        int res = 0;
        for (int i = 0; i < nums.length; i++) {
            res = res+nums[i];
        }
        return res;
    }

    public static void main(String[] args) {
        Test_kbcs test_kbcs = new Test_kbcs();
        System.out.println(test_kbcs.jiafa(12,33,22,44,44,55));
    }


}
